function createTime(ctimeMs){
    var date1=new Date(ctimeMs);
    var year=date1.getFullYear();
    var month=date1.getMonth()+1;
    month=month < 10 ? '0'+ month : month
    var day=date1.getDate();
    var hour=date1.getHours();
    var minute=date1.getMinutes();
    var minutes=minute < 10 ? '0'+minute : minute
    return year+'-'+month+'-'+day+' '+hour+':'+minutes
}

const fs=require('fs');
const path=require('path');

var filePath=path.join(__dirname,'/1.txt')

var fileObj=fs.statSync(filePath)//获取文件信息
console.log(fileObj)
var ctimeMs=fileObj.ctimeMs;//最后一次更新文件的时间戳

console.log(createTime(ctimeMs));
